<?php 

session_start();
include '../db_functions/database.php';

if (isset($_SESSION['id']))
{
	$connection=Connect();	
	$query="INSERT INTO orders (order_customer_id, order_status, order_description,order_total)
			VALUES (".$_SESSION['id'].", 'ordered', '".$_POST['order_description']."', ".$_POST['total'].")";
	if (!mysql_query( $query, $connection ))
	die( 'Error: ' . mysql_error() );
	
	
}
header( 'Location: ../index.php' ) ;
?>